package com.acme.domain.bank;

public class SavingAccount extends AbstractAccount{

	public SavingAccount(){
		super();
	}
	
	public SavingAccount(double balance) throws IllegalArgumentException{
		super();
		if(balance < 0)
			throw new IllegalArgumentException("balance < 0");
		else
			setBalance(balance);
	}
	
	@Override
	public double maximumAmountToWithdraw() {
		return getBalance();
	}

}
